package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IStartPageModel;
import com.wgts.wgts.mvp.model.imp.StartPageModel;
import com.wgts.wgts.mvp.presenter.IStartPagePersenter;
import com.wgts.wgts.mvp.presenter.imp.StartPagePersenter;
import com.wgts.wgts.mvp.view.IStartPageView;
import com.wgts.wgts.netmodle.NetService;
import com.wgts.wgts.tools.AppInfor;
import com.wgts.wgts.tools.CountDownTime;
import com.wgts.wgts.tools.SharedpreferencesHelper;

import dagger.Module;
import dagger.Provides;

@Module
public class StartPageModule {

    private IStartPageView view;

    public StartPageModule(IStartPageView view) {
        this.view = view;
    }

    @Provides
    @ActivityScope
    public IStartPageView provideView(){
        return view;
    }

    @Provides
    @ActivityScope
    public IStartPageModel provideModle(AppInfor appInfor, SharedpreferencesHelper sharedpreferencesHelper, CountDownTime countDownTime, NetService netService){
        return new StartPageModel(sharedpreferencesHelper, appInfor, countDownTime, netService);
    }

    @Provides
    @ActivityScope
    public IStartPagePersenter providePersenter(IStartPageModel model, IStartPageView view){
        return new StartPagePersenter(model, view);
    }
}
